$(function () {
    /*员工信息*/
    $("#dg").datagrid({
        url:"/employeeList",
        columns:[[
            {field:'username',title:'姓名',width:100,align:'center'},
            {field:'account',title:'账号',width:100,align:'center'},
            {field:'password',title:'密码',width:100,align:'center'},
            {field:'state',title:'类别',width:100,align:'center',formatter: function(value,row,index){
                    if(row.state){
                        return "职工";
                    }else {
                        return "学生"
                    }
                }},
            {field:'cardId',title:'身份证ID',width:100,align:'center'}
        ]],
        fit:true,
        fitColumns:true,
        rownumbers:true,
        pagination:true,
        singleSelect:true,
        pageSize:30,
        toolbar: '#tb'
    })
});